const prefix = "/api";

const api = {
  get: {
    getConfig: "/api/user/space_admin/get_space_config",
    // 获取列表
    getPageList: `${prefix}/data_service/indexes/page_list`,
    // 获取索引是否存在
    getIndexExists: `${prefix}/data_service/indexes/exists/:indexName`,
    // 获取索引列表
    getIndexTypeDict: `${prefix}/data_service/indexes/get_dict/index_type`,
    // 获取生产源
    getProdSource: `${prefix}/data_service/indexes/prod_source`,
    // 获取编辑单个生产源
    getProdSourceInfo: `${prefix}/data_service/indexes/prod_source_by_id/:sourceId`,
    // 获取索引映射Mapping
    getProdSourceMapping: `${prefix}/data_service/indexes/prod_source_mapping/:sourceId`,
    // 获取索引的编辑信息
    getIndexById: `${prefix}/data_service/indexes/get_by_id/:indexId`,
    // 获取单个刷新
    getRefreshOne: `${prefix}/data_service/indexes/refresh_one/:indexId`,
    // 获取日志
    getLog: `${prefix}/data_service/indexes/index_task_log/:indexId`,
  },
  post: {
    // 获取新增索引
    getCreateIndex: `${prefix}/data_service/indexes/create`,
    // 获取数据同步
    dataSync: `${prefix}/data_service/indexes/data_sync`,
    // 获取停止同步
    stopSync: `${prefix}/data_service/indexes/stop_data_sync`,
    // 获取日志
    createIndexTaskLog: `${prefix}/data_service/indexes/index_task_log`,
  },
  file: {},
};

export default api;
